package com.xbongbong.pro.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

@Getter
public enum ImportEnum {

    // 公共
    TYPE("type", "enum.import.attrName.type"),

    // 生日
    BIRTHDAY_FLAG("birthdayFlag", "enum.import.attrName.birthday_flag"),
    BIRTHDAY("birthday", "enum.import.attrName.birthday"),

    // 电话
    PHONE_NUMBER("phoneNumber", "enum.import.attrName.phone_number"),

    // 超链接
    HREF_TEXT("hrefText", "enum.import.attrName.href_text"),
    HREF_LINK("hrefLink", "enum.import.attrName.href_link"),

    // 地址
    PROVINCE("province", "enum.import.attrName.province"),
    CITY("city", "enum.import.attrName.city"),
    AREA("district", "enum.import.attrName.area"),
    DETAIL_ADDRESS("address", "enum.import.attrName.detail_address"),

    // 库存产品
    STOCK_PRODUCT("stockProduct", "enum.import.attrName.stock_product"),
    // 装配用
    IN_STOCK_PRODUCT("inStockProduct", "enum.import.attrName.in_stock_product"),
    OUT_STOCK_PRODUCT("outStockProduct", "enum.import.attrName.out_stock_product"),

    // 跟进类型
    COMMUNICATE_BUSINESS_TYPE("businessType", "enum.import.attrName.communicate_business_type"),
    COMMUNICATE_NAME("name", "enum.import.attrName.communicate_name"),

    // 关联客户
    LINK_CUSTOMER_NAME("customerName", "enum.import.attrName.link_customer_name"),
    LINK_CUSTOMER_PHONE("customerPhone", "enum.import.attrName.link_customer_phone"),

    // 其他费用
    OTHER_CHARGE("otherCharge", "enum.import.attrName.other_charge"),

    // 模板字段
    TEMPLATE_NAME("templateName", "enum.templateField.name.templateName"),
    FILE("file", "enum.templateField.name.file"),


    ;

    /**
     * 属性
     */
    private String attr;
    /**
     * 属性名称
     */
    private String attrName;

    ImportEnum(String attr, String attrName) {
        this.attr = attr;
        this.attrName = attrName;
    }

    public String getAttrName() {
        return I18nMessageUtil.getMessage(attrName);
    }

}
